<?php
require('./RedisPool.php');

$redisPool = new RedisPool();

$redisPool->addServer('myredis',['host'=>'127.0.0.1','port'=>6379]);

$redis = $redisPool::instance('myredis');


var_dump($redis);

echo PHP_EOL;

$key = 'string:user:3';

echo '添加数据:'.$key.PHP_EOL;

$redis->set($key,json_encode(['id'=>3,'name'=>'ali','mobile'=>'15098723237','mail'=>'15098723237@qq.com']));

echo '取出数据:'.$key.PHP_EOL;

$res = $redis->get($key);

print($res);
echo PHP_EOL;

